\label{\detokenize{tabular:table-having-caption}}

\begin{savenotes}\sphinxattablestart
\centering
\sphinxcapstartof{table}
\sphinxcaption{caption for table}\label{\detokenize{tabular:id1}}
\sphinxaftercaption
\begin{tabulary}{\linewidth}[t]{|T|T|}
\hline
\sphinxstyletheadfamily 
header1
&\sphinxstyletheadfamily 
header2
\\
\hline
cell1-1
&
cell1-2
\\
\hline
cell2-1
&
cell2-2
\\
\hline
cell3-1
&
cell3-2
\\
\hline
\end{tabulary}
\par
\sphinxattableend\end{savenotes}
